import request from '@util/request'

/**
 * 查询日程列表
 * @param param
 * @returns {*}
 */
export const queryScheduleList = (param) => {
    return request.post('api/v1/schedule/scheduleListQuery', param);
}
/**
 * 查询案例列表
 * @param param
 * @returns {*}
 */
export const getCallCaseByCallPlanId = (id) => {
    return request.get(`api/v1/schedule/getCallCaseByCallPlanId?callPlanId=${id}`);
}

/**
 * 保存一个反馈
 * @param param
 * @returns {*}
 */
export const feedbackSaveOrUpdate = (param) => {
    return request.post(`api/v1/schedule/feedbackSaveOrUpdate`, param);
}

/**
 * 获取产品
 * @param param
 * @returns {*}
 */
export const getProduct = () => {
    return request.get(`api/v1/schedule/product?bu=${sessionStorage.getItem('bu')}`);
}

/**
 *获取所有文章信息接口
 * @param param
 * @returns {*}
 */
export const getContentData = (param) => {
    return request.post('/ihubApi/getContentData', Object.assign({ticket: sessionStorage.getItem('ihub-ticket')}, param));
}
/**
 *获取当前登录人的已认证已加好友的医生一栏
 * @param param
 * @returns {*}
 */
export const getDoctorlist = (param) => {
    return request.post('/ihubApi/getDoctorlist', Object.assign({ticket: sessionStorage.getItem('ihub-ticket')}, param));
}


/**
 * 查询案例列表
 * @param param
 * @returns {*}
 */
export const getCallPlanList = (id) => {
    return request.get(`api/v1/schedule/getCallPlanList?parentCallPlanId=${id}`);
}
/**
 * 添加新日程
 * @param param
 * @returns {*}
 */
export const scheduleDetailCreate = (param) => {
    return request.post(`api/v1/schedule/scheduleDetailCreate`, param)
}

/**
 * 查询拜访人列表
 * @param param
 * @returns {*}
 */
export const scheduleDimensionDoctorQuery = () => {
    return request.post(`api/v1/schedule/scheduleDimensionDoctorQuery`)
}

/**
 * 日程类型查询
 * @param param
 * @returns {*}
 */
export const scheduleDimensionTypeQuery = () => {
    return request.get(`api/v1/schedule/scheduleDimensionTypeMapQuery?bu=PCBU`)
}